﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace ClipboardEditor
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (e.Args.Length != 1) return;
            switch(e.Args[0].ToLowerInvariant())
            {
                case "text":
                    Clipboard.SetText(Clipboard.GetText());
                    Shutdown();
                    break;
                case "image":
                    Clipboard.SetImage(Clipboard.GetImage());
                    Shutdown();
                    break;
                case "html":
                    Clipboard.SetData("HTML Format", Clipboard.GetData("HTML Format"));
                    Shutdown();
                    break;
                default:
                    break;
            }
        }
    }
}
